<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page import="java.util.ArrayList,
                 com.scalar.chiptrack.utils.ConfigManager" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/baseProductList.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>

<SCRIPT>


function func() {
document.fabrecipe.submit();
}
  
function addMore(count) {

	if(document.fabrecipe.count.value=='')
		count = count;

	 else
		 count=document.fabrecipe.count.value;

	 if(parseInt(count)%2==0)
		 bgcolor="#FFFFEE";

	 else
		 bgcolor="#DEE1E2";

		
var htmltext = '<table border="0" bordercolor="#FFFFFF" align="center">';
    htmltext +='<tr><td width="20%" align="center"';
    htmltext +='bgcolor='+bgcolor+'><font class="NArialL">'+count+'.</font>';
	htmltext +='</td><td width="40%" align="left" bgcolor="#FFFFEE"><font class="NArialL">';
	htmltext +='<input type="text" name="parameter" size="25" class="txfield"></font></td>';
    htmltext +='<td width="20%" align="left" bgcolor="#FFFFEE"><font class="NArialL">';
	htmltext +='<input type="text" name="minValue" size="15" class="txfield"></font></td>';
    htmltext +='<td width="20%" bgcolor="#FFFFEE" align="center">';
	htmltext +='<font class="NArialL"><input type="text" name="maxValue" size="15"';            
	htmltext +='class="txfield"></font></td></tr></table>';
var pa=document.getElementById("font1");
pa.insertAdjacentHTML('BeforeEnd',htmltext);

count=parseInt(count)+1;

document.fabrecipe.count.value=count;

}

</SCRIPT>

<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href='<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css' type='text/css' rel='stylesheet'>
</HEAD>
<BODY bgColor='#ffffff' leftMargin='0' topMargin='0' marginheight='0' marginwidth='0'>

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<html:form name="fabrecipe" type="com.scalar.chiptrack.operations.process.forms.FabRecipeForm" action="/fabRecipe">   
<input type="hidden" name="count">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

<%@ include file="/jsp/operations/operations_menu.jsp" %>

</TD>
<!-- end of the side navigations -->
<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%" align=right>

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->


<center><span class="NArialW">FAB Recipe Screen (PCM Targets)</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>
<font class="NArialL">
<br>
<br>
<table border="0" width="50%" bordercolor="#FFFFFF" align="center">
      <tr>
        <td width="20%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">&nbsp;&nbsp;&nbsp;S.No&nbsp;&nbsp;</font></font></td>
        <td width="40%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Parameter</font></td>
        <td width="20%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Min Value</font></td>
        <td width="20%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Max Value</font></td>
       </tr>
		<%int i=1;%>
		<% int bgcount=0;%>
     <logic:iterate id="Recipe" name="recipeList">
	 <logic:notEqual name="Recipe" value="null">
	 <logic:notEqual name="Recipe" property="parameter" value="">
	  <tr>
        <td width="20%" align="center" <% if(bgcount%2==0){ %> bgcolor="#DEE1E2" <%}else{%> bgcolor="#FFFFEE" <%}%>  >
		<font class="NArialL"><%=i%>.</font></td>
        <td width="40%" align="left" bgcolor="#DEE1E2"><font class="NArialL">
		<html:text name="Recipe" property="parameter" size="25" styleClass="txfield" /></font></td>
        <td width="20%" align="left" bgcolor="#DEE1E2"><font class="NArialL">
		<html:text  name="Recipe" property="minValue" size="15" styleClass="txfield" /></font></td>
        <td width="20%" bgcolor="#DEE1E2" algin="center"><font class="NArialL">
		<html:text  name="Recipe"  property="maxValue" size="15" styleClass="txfield" /></font></td>
	  </tr>
	    <% i=i+1;%>
		<%bgcount = bgcount+1;%>
		</logic:notEqual>
	    </logic:notEqual>
		</logic:iterate> 

	<% ArrayList recipeList =(ArrayList) request.getAttribute("recipeList");
	   if (recipeList.size()==0) {
        // changed by hareesh on 15th September 20003

          i=1;
		  bgcount=0;
          while(i <= 5 ){
     %>
        <tr>
            <td width="20%" align="center" <% if(bgcount%2==0){%> bgcolor="#DEE1E2" <%}else{%> bgcolor="#FFFFEE" <%}%> >
            <font class="NArialL"><%=i%>.</font></td>
            <td width="40%" align="left" bgcolor="#DEE1E2"><font class="NArialL"><input type="text" name="parameter" size="25" class="txfield"></font></td>
            <td width="20%" align="left" bgcolor="#DEE1E2"><font class="NArialL">
		    <input type="text" name="minValue" size="15" class="txfield"></font></td>
            <td width="20%" bgcolor="#DEE1E2" align="center"><font class="NArialL">
		    <input type="text" name="maxValue" size="15" class="txfield"></font></td>
       </tr>
     <%
             bgcount++;
             i++;
          }
       }
     %>

	<!--tr>
        <td width="10%" align="center"  bgcolor="#FFFFEE"><font class="NArialL">1.</font></td>
        <td width="20%" align="left" bgcolor="#FFFFEE"><font class="NArialL">
		<input type="text" name="parameter" size="25" class="txfield"></font></td>
        <td width="10%" align="left" bgcolor="#FFFFEE"><font class="NArialL">
		<input type="text" name="minValue" size="15" class="txfield"></font></td>
        <td width="10%" bgcolor="#FFFFEE">
        <p align="center"><font class="NArialL">
		<input type="text" name="maxValue" size="15" class="txfield"></font></p>
        </td>
    </tr>
     <tr>
        <td width="10%" align="center" bgcolor="#DEE1E2"><font class="NArialL">2.</font></td>
        <td width="20%" align="left" bgcolor="#DEE1E2"><font class="NArialL"><input type="text" name="parameter" size="25" class="txfield"></font></td>
        <td width="10%" align="left" bgcolor="#DEE1E2"><font class="NArialL">
		<input type="text" name="minValue" size="15" class="txfield"></font></td>
        <td width="10%" bgcolor="#DEE1E2">
          <p align="center"><font class="NArialL">
		  <input type="text" name="maxValue" size="15" class="txfield"></font></p>
        </td>
       </tr>
       <tr>
        <td width="10%" align="center" bgcolor="#FFFFEE"><font class="NArialL">3.</font></td>
        <td width="20%" align="left" bgcolor="#FFFFEE"><font class="NArialL">
		<input type="text" name="parameter" size="25" class="txfield"></font></td>
        <td width="10%" align="left" bgcolor="#FFFFEE"><font class="NArialL">
		<input type="text" name="minValue" size="15" class="txfield"></font></td>
        <td width="10%" bgcolor="#FFFFEE">
          <p align="center"><font class="NArialL">
		  <input type="text" name="maxValue" size="15" class="txfield"></font></p>
        </td>
    </tr>

		<tr>
        <td width="10%" align="center" bgcolor="#DEE1E2"><font class="NArialL">4.</font></td>
        <td width="20%" align="left" bgcolor="#DEE1E2"><font class="NArialL">
		<input type="text" name="parameter" size="25" class="txfield"></font></td>
        <td width="10%" align="left" bgcolor="#DEE1E2"><font class="NArialL">
		<input type="text" name="minValue" size="15" class="txfield"></font></td>
        <td width="10%" bgcolor="#DEE1E2">
          <p align="center"><font class="NArialL">
		  <input type="text" name="maxValue" size="15" class="txfield"></font></p>
        </td>
       </tr>
       <tr>
        <td width="10%" align="center" bgcolor="#FFFFEE"><font class="NArialL">5.</font></td>
        <td width="20%" align="left"   bgcolor="#FFFFEE"><font class="NArialL"><input type="text"   name="parameter" size="25"    class="txfield"></font></td>
        <td width="10%" align="left" bgcolor="#FFFFEE"><font class="NArialL">
		<input type="text" name="minValue" size="15" class="txfield"></font></td>
        <td width="10%" bgcolor="#FFFFEE">
      <p align="center"><font class="NArialL">
	  <input type="text" name="maxValue" size="15" class="txfield"></font></p>
      </td>
    </tr-->
	<% //i=6; } %>

	<tr><td colspan="4"><font id=font1></font></td></tr>

    </table>

  <p align="center">&nbsp;

  <!--a  href="javascript:func()"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17"></a-->
  <chiptrack:restrictedLink functionality='<%=Functionality.PRODUCT_SETUP%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:func();' onmouseover="window.status='Click here to save recipes for FAB Process';return true" onmouseout="window.status='';return true">
  <img border='0' src='<%=chipTracContext%>/jsp/includes/images/save.gif'></chiptrack:restrictedLink>
  &nbsp;&nbsp;
  <a href="javascript:addMore('<%=i%>')"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/addmore.gif" width="65" height="17"></a></p>

    </font>


<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->

<%@ include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->
</html:form>
</BODY>
</html>
